using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class CreateChatRoomRequest : GeneratedMessageLite<CreateChatRoomRequest, CreateChatRoomRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<CreateChatRoomRequest, CreateChatRoomRequest.Builder>
		{
			private bool resultIsReadOnly;
			private CreateChatRoomRequest result;
			protected override CreateChatRoomRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override CreateChatRoomRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override CreateChatRoomRequest DefaultInstanceForType
			{
				get
				{
					return CreateChatRoomRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public SKBuiltinString_t Topic
			{
				get
				{
					return this.result.Topic;
				}
				set
				{
					this.SetTopic(value);
				}
			}
			public uint MemberCount
			{
				get
				{
					return this.result.MemberCount;
				}
				set
				{
					this.SetMemberCount(value);
				}
			}
			public IPopsicleList<MemberReq> MemberListList
			{
				get
				{
					return this.PrepareBuilder().memberList_;
				}
			}
			public int MemberListCount
			{
				get
				{
					return this.result.MemberListCount;
				}
			}
			public Builder()
			{
				this.result = CreateChatRoomRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(CreateChatRoomRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private CreateChatRoomRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					CreateChatRoomRequest other = this.result;
					this.result = new CreateChatRoomRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override CreateChatRoomRequest.Builder Clear()
			{
				this.result = CreateChatRoomRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override CreateChatRoomRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new CreateChatRoomRequest.Builder(this.result);
				}
				return new CreateChatRoomRequest.Builder().MergeFrom(this.result);
			}
			public override CreateChatRoomRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override CreateChatRoomRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is CreateChatRoomRequest)
				{
					return this.MergeFrom((CreateChatRoomRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override CreateChatRoomRequest.Builder MergeFrom(CreateChatRoomRequest other)
			{
				return this;
			}
			public override CreateChatRoomRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override CreateChatRoomRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(CreateChatRoomRequest._createChatRoomRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = CreateChatRoomRequest._createChatRoomRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 18u)
						{
							SKBuiltinString_t.Builder builder2 = SKBuiltinString_t.CreateBuilder();
							if (this.result.hasTopic)
							{
								builder2.MergeFrom(this.Topic);
							}
							input.ReadMessage(builder2, extensionRegistry);
							this.Topic = builder2.BuildPartial();
							continue;
						}
						if (num3 == 24u)
						{
							this.result.hasMemberCount = input.ReadUInt32(ref this.result.memberCount_);
							continue;
						}
						if (num3 == 34u)
						{
							input.ReadMessageArray<MemberReq>(num, text, this.result.memberList_, MemberReq.DefaultInstance, extensionRegistry);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public CreateChatRoomRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public CreateChatRoomRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public CreateChatRoomRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public CreateChatRoomRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public CreateChatRoomRequest.Builder SetTopic(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasTopic = true;
				this.result.topic_ = value;
				return this;
			}
			public CreateChatRoomRequest.Builder SetTopic(SKBuiltinString_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasTopic = true;
				this.result.topic_ = builderForValue.Build();
				return this;
			}
			public CreateChatRoomRequest.Builder MergeTopic(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasTopic && this.result.topic_ != SKBuiltinString_t.DefaultInstance)
				{
					this.result.topic_ = SKBuiltinString_t.CreateBuilder(this.result.topic_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.topic_ = value;
				}
				this.result.hasTopic = true;
				return this;
			}
			public CreateChatRoomRequest.Builder ClearTopic()
			{
				this.PrepareBuilder();
				this.result.hasTopic = false;
				this.result.topic_ = null;
				return this;
			}
			public CreateChatRoomRequest.Builder SetMemberCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasMemberCount = true;
				this.result.memberCount_ = value;
				return this;
			}
			public CreateChatRoomRequest.Builder ClearMemberCount()
			{
				this.PrepareBuilder();
				this.result.hasMemberCount = false;
				this.result.memberCount_ = 0u;
				return this;
			}
			public MemberReq GetMemberList(int index)
			{
				return this.result.GetMemberList(index);
			}
			public CreateChatRoomRequest.Builder SetMemberList(int index, MemberReq value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.memberList_[index] = value;
				return this;
			}
			public CreateChatRoomRequest.Builder SetMemberList(int index, MemberReq.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.memberList_[index] = builderForValue.Build();
				return this;
			}
			public CreateChatRoomRequest.Builder AddMemberList(MemberReq value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.memberList_.Add(value);
				return this;
			}
			public CreateChatRoomRequest.Builder AddMemberList(MemberReq.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.memberList_.Add(builderForValue.Build());
				return this;
			}
			public CreateChatRoomRequest.Builder AddRangeMemberList(IEnumerable<MemberReq> values)
			{
				this.PrepareBuilder();
				this.result.memberList_.Add(values);
				return this;
			}
			public CreateChatRoomRequest.Builder ClearMemberList()
			{
				this.PrepareBuilder();
				this.result.memberList_.Clear();
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int TopicFieldNumber = 2;
		public const int MemberCountFieldNumber = 3;
		public const int MemberListFieldNumber = 4;
		private static readonly CreateChatRoomRequest defaultInstance;
		private static readonly string[] _createChatRoomRequestFieldNames;
		private static readonly uint[] _createChatRoomRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasTopic;
		private SKBuiltinString_t topic_;
		private bool hasMemberCount;
		private uint memberCount_;
		private PopsicleList<MemberReq> memberList_ = new PopsicleList<MemberReq>();
		private int memoizedSerializedSize = -1;
		public static CreateChatRoomRequest DefaultInstance
		{
			get
			{
				return CreateChatRoomRequest.defaultInstance;
			}
		}
		public override CreateChatRoomRequest DefaultInstanceForType
		{
			get
			{
				return CreateChatRoomRequest.DefaultInstance;
			}
		}
		protected override CreateChatRoomRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public SKBuiltinString_t Topic
		{
			get
			{
				return this.topic_ ?? SKBuiltinString_t.DefaultInstance;
			}
		}
		public uint MemberCount
		{
			get
			{
				return this.memberCount_;
			}
		}
		public IList<MemberReq> MemberListList
		{
			get
			{
				return this.memberList_;
			}
		}
		public int MemberListCount
		{
			get
			{
				return this.memberList_.Count;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				if (!this.hasBaseRequest)
				{
					return false;
				}
				if (!this.hasTopic)
				{
					return false;
				}
				if (!this.hasMemberCount)
				{
					return false;
				}
				if (!this.BaseRequest.IsInitialized)
				{
					return false;
				}
				using (IEnumerator<MemberReq> enumerator = this.MemberListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						MemberReq current = enumerator.get_Current();
						if (!current.IsInitialized)
						{
							return false;
						}
					}
				}
				return true;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasTopic)
				{
					num += CodedOutputStream.ComputeMessageSize(2, this.Topic);
				}
				if (this.hasMemberCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.MemberCount);
				}
				using (IEnumerator<MemberReq> enumerator = this.MemberListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						MemberReq current = enumerator.get_Current();
						num += CodedOutputStream.ComputeMessageSize(4, current);
					}
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private CreateChatRoomRequest()
		{
		}
		public MemberReq GetMemberList(int index)
		{
			return this.memberList_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] createChatRoomRequestFieldNames = CreateChatRoomRequest._createChatRoomRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, createChatRoomRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasTopic)
			{
				output.WriteMessage(2, createChatRoomRequestFieldNames[3], this.Topic);
			}
			if (this.hasMemberCount)
			{
				output.WriteUInt32(3, createChatRoomRequestFieldNames[1], this.MemberCount);
			}
			if (this.memberList_.Count > 0)
			{
				output.WriteMessageArray<MemberReq>(4, createChatRoomRequestFieldNames[2], this.memberList_);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasTopic)
			{
				num ^= this.topic_.GetHashCode();
			}
			if (this.hasMemberCount)
			{
				num ^= this.memberCount_.GetHashCode();
			}
			using (IEnumerator<MemberReq> enumerator = this.memberList_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					MemberReq current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			CreateChatRoomRequest createChatRoomRequest = object_0 as CreateChatRoomRequest;
			if (createChatRoomRequest == null)
			{
				return false;
			}
			if (this.hasBaseRequest != createChatRoomRequest.hasBaseRequest || (this.hasBaseRequest && !this.baseRequest_.Equals(createChatRoomRequest.baseRequest_)))
			{
				return false;
			}
			if (this.hasTopic != createChatRoomRequest.hasTopic || (this.hasTopic && !this.topic_.Equals(createChatRoomRequest.topic_)))
			{
				return false;
			}
			if (this.hasMemberCount != createChatRoomRequest.hasMemberCount || (this.hasMemberCount && !this.memberCount_.Equals(createChatRoomRequest.memberCount_)))
			{
				return false;
			}
			if (this.memberList_.Count != createChatRoomRequest.memberList_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.memberList_.Count; i++)
			{
				if (!this.memberList_[i].Equals(createChatRoomRequest.memberList_[i]))
				{
					return false;
				}
			}
			return true;
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<CreateChatRoomRequest, CreateChatRoomRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<CreateChatRoomRequest, CreateChatRoomRequest.Builder>.PrintField("Topic", this.hasTopic, this.topic_, writer);
			GeneratedMessageLite<CreateChatRoomRequest, CreateChatRoomRequest.Builder>.PrintField("MemberCount", this.hasMemberCount, this.memberCount_, writer);
			GeneratedMessageLite<CreateChatRoomRequest, CreateChatRoomRequest.Builder>.PrintField<MemberReq>("MemberList", this.memberList_, writer);
		}
		public static CreateChatRoomRequest ParseFrom(byte[] data)
		{
			return CreateChatRoomRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private CreateChatRoomRequest MakeReadOnly()
		{
			this.memberList_.MakeReadOnly();
			return this;
		}
		public static CreateChatRoomRequest.Builder CreateBuilder()
		{
			return new CreateChatRoomRequest.Builder();
		}
		public override CreateChatRoomRequest.Builder ToBuilder()
		{
			return CreateChatRoomRequest.CreateBuilder(this);
		}
		public override CreateChatRoomRequest.Builder CreateBuilderForType()
		{
			return new CreateChatRoomRequest.Builder();
		}
		public static CreateChatRoomRequest.Builder CreateBuilder(CreateChatRoomRequest prototype)
		{
			return new CreateChatRoomRequest.Builder(prototype);
		}
		static CreateChatRoomRequest()
		{
			CreateChatRoomRequest.defaultInstance = new CreateChatRoomRequest().MakeReadOnly();
			CreateChatRoomRequest._createChatRoomRequestFieldNames = new string[]
			{
				"BaseRequest",
				"MemberCount",
				"MemberList",
				"Topic"
			};
			CreateChatRoomRequest._createChatRoomRequestFieldTags = new uint[]
			{
				10u,
				24u,
				34u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.CreateChatRoomRequest.Descriptor, null);
		}
	}
}
